﻿<%@ Page Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ChiTietTinNhan.aspx.cs"
    Inherits="WebRaoVat.ChiTietTinNhan" Title="Chi tiết tin nhắn" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <div id="box-pro-highlights">
        <div class="box-pro-highlights-header">
            <a href="###" target="_blank" class="no-hover">Chi tiết tin nhắn</a>
        </div>
        <div class="content">
            <p>
                &nbsp;</p>
            <p style="font-size: medium; color: #800000;">
                Người gởi:&nbsp; <a href="NguoiDung.aspx?MaNguoiDung=<%= TinNhanDuocXem.MaNguoiDung %>">
                    <%= NguoiGoi %></a>
            </p>
            <p style="font-size: medium; color: #800000;">
                Thời gian gởi:&nbsp;<%= TinNhanDuocXem.ThoiGianNhanTin.ToString() %>
            </p>
            <p>
                &nbsp;</p>
            <table border="0" cellspacing="0" cellpadding="0" width="90%" 
                style="margin-left: 32px;">
                <tr>
                    <td>
                        <b>Tiêu đề:</b><br />
                        <br />
                        <%= TinNhanDuocXem.TieuDeTinNhan %>
                        <br />
                        <br />
                        <br />
                        <br />
                        <b>Nội dung:</b><br />
                        <br />
                        <%= TinNhanDuocXem.NoiDungTinNhan %>
                    </td>
                </tr>
            </table>
            <br />
            <br />
            <br />
            <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
            </asp:ToolkitScriptManager>
            <asp:Panel ID="pnNhanTin1" runat="server" Font-Size="Medium" ForeColor="Blue">
                <asp:Image ID="imgNhanTin" runat="server" />
                Trả lời
                <asp:Label ID="lbNhanTin" runat="server"></asp:Label>
            </asp:Panel>
            <div style="height: 5px">
                &nbsp;
            </div>
            <asp:UpdatePanel ID="UpdatePanelNhanTin" runat="server">
                <ContentTemplate>
                    <asp:CollapsiblePanelExtender ID="CollapsiblePanelExtenderNhanTin" runat="server"
                        Collapsed="True" TargetControlID="pnNhanTin2" CollapseControlID="pnNhanTin1"
                        CollapsedImage="images/Expand.png" CollapsedText="(Mở ra)" ExpandControlID="pnNhanTin1"
                        ExpandedImage="images/collape.png" ExpandedText="(Đóng lại)" ImageControlID="imgNhanTin"
                        TextLabelID="lbNhanTin">
                    </asp:CollapsiblePanelExtender>
                    <asp:Panel ID="pnNhanTin2" runat="server">
                        <div style="text-align: center">
                            <table border="0" cellspacing="0" cellpadding="0" width="80%" align="center" style="border: thin solid #0000FF;
                                margin-left: 65px">
                                <tr>
                                    <td colspan="4">
                                        &nbsp;
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width: 10%">
                                        &nbsp;
                                    </td>
                                    <td style="width: 30%; text-align: right">
                                        Tiêu đề:&nbsp;
                                    </td>
                                    <td style="width: 30%; text-align: left">
                                        <asp:TextBox ID="txtTieuDe" runat="server" BorderStyle="Solid" Width="200px"></asp:TextBox>
                                    </td>
                                    <td>
                                        &nbsp;
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        &nbsp;
                                    </td>
                                    <td style="text-align: right">
                                        Nội dung:&nbsp;
                                    </td>
                                    <td style="text-align: left">
                                        <asp:TextBox ID="txtNoiDung" runat="server" BorderStyle="Solid" TextMode="MultiLine"
                                            Width="200px"></asp:TextBox>
                                    </td>
                                    <td>
                                        &nbsp;
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="4">
                                        &nbsp;
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="4">
                                        <asp:Button ID="btnGoi" runat="server" Text="Gởi" OnClick="btnGoi_Click" />
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="4">
                                        &nbsp;
                                    </td>
                                </tr>
                                <% if (ListMessage.Count > 0)
                                   {
                                       for (int iNhanTin = 0; iNhanTin < ListMessage.Count; ++iNhanTin)
                                       {                                                                
                                %>
                                <tr>
                                    <td colspan="4">
                                        <div style="font-size: smaller; color: Red">
                                            <%= ListMessage[iNhanTin]%>
                                        </div>
                                    </td>
                                </tr>
                                <% } %>
                                <tr>
                                    <td colspan="4">
                                        &nbsp;
                                    </td>
                                </tr>
                                <% } %>
                            </table>
                            <p>
                                &nbsp;</p>
                        </div>
                    </asp:Panel>
                </ContentTemplate>
            </asp:UpdatePanel>
            <p>
                &nbsp;</p>
            <a href="NguoiDung.aspx?MaNguoiDung=<%= TinNhanDuocXem.MaNguoiNhanTin %>">Trở về trang Quản lý tin nhắn</a>
            <p>&nbsp;</p>
        </div>
    </div>
</asp:Content>
